package test;

import model.Course;
import model.Teacher;
import model.Student;

public class CourseSystemMain {
    public static void main(String[] args) {
        // 1. 课程实例化（无需传入教师ID）
        Course javaCourse = new Course("C001", "Java应用开发技术", "1#主楼-2501", "周四08:00-09:40");
        Course circuitCourse = new Course("C002", "电路与模拟电子技术", "17#综合楼-教202", "周二08:00-09:40");
        Course linearAlgebra = new Course("C003", "线性代数", "17#综合楼-教105", "周五08:00-09:40");
        Course discreteMath = new Course("C004", "离散数学B", "17#综合楼-教201", "周三10:00-11:40");

        // 2. 教师实例化
        Teacher t1 = new Teacher("T001", "Java李老师", "男");
        Teacher t2 = new Teacher("T002", "电路王老师", "男");
        Teacher t3 = new Teacher("T003", "代数张老师", "女");
        Teacher t4 = new Teacher("T004", "离散赵老师", "男");

        // 3. 教师开课（课程自动关联教师）
        t1.openCourse(javaCourse);
        t2.openCourse(circuitCourse);
        t3.openCourse(linearAlgebra);
        t4.openCourse(discreteMath);

        // 4. 学生实例化并选课（支持多选）
        Student student = new Student("S001", "小明", "男");
        student.selectCourse(javaCourse);
        student.selectCourse(circuitCourse);
        student.selectCourse(linearAlgebra);
        student.selectCourse(discreteMath);

        // 5. 打印课表（自动显示所有选课+教师信息）
        student.printSchedule();

        // 6. 模拟退课（可选）
        student.dropCourse(circuitCourse);
        System.out.println("\n退课后的课表：");
        student.printSchedule();
    }
}